package com.headfirst.BehaviorMode.strategy.version3;

/**
 * @author sunhongguang
 * @create 2022-01-09-22:11
 */
public class MallardDuck extends Duck {

    public MallardDuck(){
        super.setQuackBehavior(new Quack());
        super.setFlyBehavior(new FlyWithWings());
    }

    @Override
    public void display() {
        System.out.println("绿头鸭");
    }
}
